package cn.ls.testshiromd5;

import org.apache.shiro.crypto.hash.Md5Hash;

public class TestShiroMd5003 {
    public static void main(String[] args) {
        //创建一个md5加密
        Md5Hash md5Hash = new Md5Hash("123");
        String s = md5Hash.toHex();
        System.out.println(s);

        //md5+salt(盐)处理
        Md5Hash hash = new Md5Hash("123", "X0*7ps");
        System.out.println(hash.toHex());

        //md5+salt(盐)处理+hash散列
        Md5Hash hash2 = new Md5Hash("123", "X0*7ps",1024);
        System.out.println(hash2.toHex());

    }

}
